﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
using System.Linq;
using System.Web;

namespace GoPlay.Models
{
    public class Game : IEntity
    {
        [Key]
        [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }

        [Required]
        [DataType(DataType.Date)]
        [Display(Name = "Game Date")]
        public string Date { get; set; }

        [Required]
        [DataType(DataType.Time)]
        [Display(Name = "Game Time")]
        public string Time { get; set; }

        [DataType(DataType.Text)]
        [Display(Name = "GF")]
        public string GF { get; set; }

        [DataType(DataType.Text)]
        [Display(Name = "GA")]
        public string GA { get; set; }

        [DataType(DataType.Text)]
        [Display(Name = "Decision")]
        public string Decision { get; set; }

        // Foreign key to UserProfile in Membership Services
        [ForeignKey("UserProfile")]
        public int UserId { get; set; }
        public virtual UserProfile UserProfile { get; set; }

        // Foreign key to Team
        [ForeignKey("Team")]
        public int TeamId { get; set; }
        public Team Team { get; set; }
    }
}